package Modele;

import java.util.Collection;
import java.sql.SQLException;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author sio
 */
public class Pays {

    Collection<Dep> lesDeps;
    Collection<Spe> lesSpe;

    public Pays() {
         lesDeps = DAO.getlesDeps();
         lesSpe = DAO.getlesSpe();
//         Collection<Med> lesMeds = DAO.getLesMeds();
//            for(Med unMed : lesMeds) {
//                 unDep.addMed(m);
//            }
//         
    }

    public Collection getLesDeps() {
        return lesDeps;
    }

    public Dep getLeDep(String numDep) {
        for (Dep unDep : lesDeps) {
            if (numDep.equals(unDep.getNum())) {
                return unDep;
            }
        }
        return null;
    }
    
   public Collection getLesSpe() {
        return lesSpe;
    } 
   
    public Spe getLeSpe(String numSpe) {
        for (Spe uneSpe : lesSpe) {
            if (numSpe.equals(uneSpe.getNum())) {
                return uneSpe;
            }
        }
        return null;
    }
}
